package thinkingJava.chapter11;

public class StackTest {
	public static void main(String[] args) {
		Stack<String> stack = new Stack<String>();
		for (String s : "My dog is flear".split(" ")) {
			stack.push(s);
		}
		while (!stack.isEmpty()) {
			System.out.println(stack.pop());
		}
		System.out.println("||||||||||||||||||||||||||||||||");
		java.util.Stack<String> stack2 = new java.util.Stack<String>();
		for (String s : "My dog is a cat!".split(" ")) {
			stack2.push(s);
		}
		while (!stack2.empty()) {
			System.out.println(stack2.pop());
		}
	}
}
